const path = require('path');

function resolve(dir) {
  return path.join(__dirname, dir)
}

module.exports = {
  publicPath: './',
  outputDir: 'dist',
  assetsDir: 'assets',
  indexPath: 'index.html',
  productionSourceMap: false,
  filenameHashing: true,
  lintOnSave: false,
  chainWebpack: config => {
    config.resolve.alias
      .set('@', resolve('src'))
      .set('viewsPath', resolve('src/views'))
      .set('foundationPath', resolve('src/views/foundation'))
      .set('fakumaPath', resolve('src/views/fakuma'))
      .set('routerPath', resolve('src/router'))
      .set('storePath', resolve('src/store'))
      .set('componentsPath', resolve('src/components'))
      .set('stylePath', resolve('src/style'))
      .set('ajaxPath', resolve('src/ajax'))
      .set('servicePath', resolve('src/service'))
      .set('viewsAssets', resolve('src/assets'))
  }
}